import React from "react";
import "./index.less";
import {Icon} from "weaver-mobile";
import PropTypes from "prop-types";

/**
 * 警告页
 * eg：无权限页面、无数据页面
 * jiansong 2019/11/8
 */

/**
 * @param show 是否展示
 * @param top 页面距离顶部值
 * @param icon 显示icon
 * @param msg 显示内容
 */
const WrAlertPage = ({show = false, top = "40%", icon = "wuquanxian", msg = ""}) => (
    show && <div className="workrelate-wrAlertPage">
        <div className="workrelate-wrAlertPage-con" style={{marginTop: top}}>
            <Icon type={icon}/>
            <div dangerouslySetInnerHTML={{__html: msg}} className="workrelate-wrAlertPage-content"></div>
        </div>
    </div>
)

WrAlertPage.propTypes = {
    show: PropTypes.bool,
    top: PropTypes.string,
    icon: PropTypes.string,
    msg: PropTypes.string,
}
export default WrAlertPage;